<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title><#if entity.id??>编辑<#else>新增</#if>商家信息表</title>
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-switch/bootstrap-switch.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-switch/bootstrap-switch.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化




                    $('[name="isAuthcb"]').bootstrapSwitch({
                                onText:"是",
                                offText:"否",
                        onColor:"success",
                        offColor:"info",
                        size:"small",
                        onSwitchChange:function(event,state){
                            if(state==true){
                                $(this).val("1");
                                $('[name="isAuth"]').val("1");
                            }else{
                                $(this).val("0");
                                $('[name="isAuth"]').val("0");
                            }
                        }
                    });
                    $('[name="distributioncb"]').bootstrapSwitch({
                                onText:"是",
                                offText:"否",
                        onColor:"success",
                        offColor:"info",
                        size:"small",
                        onSwitchChange:function(event,state){
                            if(state==true){
                                $(this).val("1");
                                $('[name="distribution"]').val("1");
                            }else{
                                $(this).val("0");
                                $('[name="distribution"]').val("0");
                            }
                        }
                    });


                $('#approveTime').datetimepicker();
                $('#createTime').datetimepicker();




            $('#czjbusinessForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {



                    
                businessName:{
                    message: '输入商家名称出错',
                    validators:{
                        notEmpty: {
                            message: '商家名称不能为空'
                        },
                        stringLength:{
                            max: 255,
                            message: '商家名称不能超过 255个字符'
                        }
                    }
                }

                    ,
                startTime:{
                    message: '输入营业开始时间出错',
                    validators:{
                        notEmpty: {
                            message: '营业开始时间不能为空'
                        },
                        stringLength:{
                            max: 50,
                            message: '营业开始时间不能超过 50个字符'
                        }
                    }
                }

                    ,
                endTime:{
                    message: '输入营业结束时间出错',
                    validators:{
                        notEmpty: {
                            message: '营业结束时间不能为空'
                        },
                        stringLength:{
                            max: 50,
                            message: '营业结束时间不能超过 50个字符'
                        }
                    }
                }





                    ,
                remarker:{
                    message: '输入备注出错',
                    validators:{
                        notEmpty: {
                            message: '备注不能为空'
                        },
                        stringLength:{
                            max: 100,
                            message: '备注不能超过 100个字符'
                        }
                    }
                }








                }
            });


        });

    </script>
</head>
<body>

<#include "/view/admin/listnav.html"/>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="czjbusinessForm" action="${base}/czjbusiness/save.do"
     >
    <table class="table table-bordered">

                        <input type="hidden" style="display: none" name="id" value="${entity.id!}"/>


                <tr>
                <th>商家名称</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="businessName" name="businessName" placeholder="请输入商家名称" value="${entity.businessName!}">
                    </div>
                </td>
                

                
               <!--  <th>营业开始时间</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="startTime" name="startTime" placeholder="请输入营业开始时间" value="${entity.startTime!}">
                    </div>
                </td>
                </tr>

                <tr>
                <th>营业结束时间</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="endTime" name="endTime" placeholder="请输入营业结束时间" value="${entity.endTime!}">
                    </div>
                </td>
                

                
                <th>是否认证</th>
                <td>
                <input name="isAuth" type="hidden" value="<#if entity.isAuth??>${entity.isAuth}<#else>0</#if>"/>
                <input name="isAuthcb" type="checkbox"  data-size="small"
                       <#if entity.isAuth??>
                        <#if 1==entity.isAuth>
                            checked="checked"
                            value="1"</#if>
                        <#if 0==entity.isAuth>
                            value="0"</#if>
                </#if>/>
                </td>
                </tr>



                <tr>
                <th>配送方式：是否支持送货上门</th>
                <td>
                <input name="distribution" type="hidden" value="<#if entity.distribution??>${entity.distribution}<#else>0</#if>"/>
                <input name="distributioncb" type="checkbox"  data-size="small"
                       <#if entity.distribution??>
                        <#if 1==entity.distribution>
                            checked="checked"
                            value="1"</#if>
                        <#if 0==entity.distribution>
                            value="0"</#if>
                </#if>/>
                </td>
                 -->



                
                <th>备注</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="remarker" name="remarker" placeholder="请输入备注" value="${entity.remarker!}">
                    </div>
                </td>
                </tr>

               <#-- <tr>
                <th>审批状态</th>
                <td>
                    <div class="form-group">
                        <select id="approveStatus" name="approveStatus"
                                class="form-control"
                        >
                            <option value="">请选择审批状态</option>
                                            <option value="0" <#if entity.approveStatus??&&0 == entity.approveStatus>selected="selected"</#if>>审批中</option>

                                            <option value="1" <#if entity.approveStatus??&&1 == entity.approveStatus>selected="selected"</#if>>审批通过</option>

                                            <option value="2" <#if entity.approveStatus??&&2 == entity.approveStatus>selected="selected"</#if>>审批不通过</option>


                        </select>
                    </div>
                </td>
                

                
                <th>审批时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.approveTime)?? >${entity.approveTime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="approveTime" name="approveTime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>
                </tr>

                <tr>
                <th>创建时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.createTime)?? >${entity.createTime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createTime" name="createTime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>-->
                

                        <input type="hidden" style="display: none" name="delFlag" value="${entity.delFlag!}"/>



        <tr>
            <td colspan="4" width="100%" style="text-align: center;">
                <input type="submit" class="btn btn-success " value="保存"/>
                <span style="width: 20px;">&nbsp;</span>
                <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                   </span>返回</a>
            </td>
        </tr>

    </table>
</form>




</div>

<script type="text/javascript">

</script>


</body>
</html>
